import java.util.Scanner;

public class Day_33_1_剪花布条 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()){
            String s1=scanner.next();
            String s2=scanner.next();
            System.out.println(contains(s1,s2));
        }
    }
    private static int contains(String s1,String s2) {
        int count=0;
        for (int i = 0; i <= s1.length()-s2.length(); i++) {
            if (s1.substring(i,i+s2.length()).equals(s2)){
                ++count;
                i=i+s2.length()-1;
            }
        }
        return count;
    }

}
